<?php include './application/views/zhs_mobile/header.php';?>

<section class="invbd main">
    <ul class="invbd_title">
      <li hidefocus="true" class="active"><?php echo CON_NAME;?>理财</li>
      <li hidefocus="true">即将上线</li>
    </ul>
    <div class="swiper-container">
    	<div class="swiper-wrapper">
		      <div class="swiper-slide">
		        <ul class="content-slide">
		         <?php foreach ($borrow_list as $borrow){
		         	$borrname="";
		         	$borrimg = "yp.jpg";
		         	if(1==$borrow['ftype']){
		         		$borrname = CON_NAME."标的 第 ".$borrow['id']." 期 ";
		         		$borrimg = "yp.jpg";
		         	}elseif (2==$borrow['ftype']){
		         		$borrname = CON_NAME."红本 第 ".$borrow['id']." 期 ";
		         		$borrimg = "hb.jpg";
		         	}elseif (3==$borrow['ftype']){
		         		$borrname = CON_NAME."车贷 第 ".$borrow['id']." 期 ";
		         		$borrimg = "zp.jpg";
		         	}
		         	?>
		          <li><a href="/zhs_mobile/borrow/obj/<?php echo $borrow['id']; ?>" target="_self">
		            <dl>
		              <dd><img src="<?php echo CON_STATIC_URL; ?>zhsjr/mobile/images/<?php echo $borrimg;?>"></dd>
		              <dt>
		                <h3>
		                	<!--
		                <?php if($borrow['award']=='1') echo "<img title='{$borrow['funds']}%' src='/static/zhsjr/images/jiang.png'/>"; 
		                	  elseif($borrow['award']=='2') echo "<img  title='{$borrow['funds']}元'  src='/static/zhsjr/images/jiang.png'/>";?>
		                	-->
		                <?php echo $borrname;?>
		                </h3>
		                <span>投资周期:<em><?php if($borrow['is_day'] == 1) echo " ".$borrow['bill_times']." 天"; else echo " ".$borrow['time_limit']." 月"; ?></em></span>
		                 <span>信用等级:<em><img title="<?php echo $borrow_fsafe[$borrow['fsafe']][0];?>" alt="<?php echo $borrow_fsafe[$borrow['fsafe']][0];?>" src="<?php echo $borrow_fsafe[$borrow['fsafe']][1];?>"> </em></span>
		              <br>
		               <span style="margin-right:6px;">投资进度:</span>
		                <div class="jd"><div class="rz-container">
		                <div class="rz-value" style="width:<?php echo round($borrow['account_yes']/$borrow['account']*100);?>%"></div>
		                </div><em><h4 class="num"><?php echo round($borrow['account_yes']/$borrow['account']*100);?>%</h4></em></div>
		              <br>
		               <span style="clear:both;">理财金额: <em> <?php echo $borrow['account'];?> 元</em></span>
		              <br> 
		              <span>年利率: <em><?php echo $borrow['apr'];?> %</em></span>
		              <span  style="margin-left:30px;"><em><?php if($borrow['award']=='1') echo "奖励:+{$borrow['funds']}%"; elseif($borrow['award']=='2') echo "奖励:+{$borrow['funds']}元";?></em></span> 
		              </dt>
		            </dl>
		            </a>
		          </li>
		          <?php }?>
		        </ul>
		        <br/><br/>
		      </div>
		      <div class="swiper-slide">
		        <ul class="content-slide">
		 		<?php foreach ($wait_borrow_list as $borrow){
		 					$borrname="";
		         	$borrimg = "yp.jpg";
		         	if(1==$borrow['ftype']){
		         		$borrname = CON_NAME."标的 第 ".$borrow['id']." 期 ";
		         		$borrimg = "yp.jpg";
		         	}elseif (2==$borrow['ftype']){
		         		$borrname = CON_NAME."红本 第 ".$borrow['id']." 期 ";
		         		$borrimg = "hb.jpg";
		         	}elseif (3==$borrow['ftype']){
		         		$borrname = CON_NAME."车贷 第 ".$borrow['id']." 期 ";
		         		$borrimg = "zp.jpg";
		         	}
		 			?>
		          <li><a href="/zhs_mobile/borrow/obj/<?php echo $borrow['id']; ?>" target="_self">
		            <dl>
		              <dd><img src="<?php echo CON_STATIC_URL; ?>zhsjr/mobile/images/<?php echo $borrimg;?>"></dd>
		              <dt>
		              	 <h3>
												
		                		<?php echo $borrname;?>
		                </h3>
		                <span>投资周期<em><?php if($borrow['is_day'] == '1') echo " ".$borrow['bill_times']." 天"; else echo " ".$borrow['time_limit']." 月"; ?></em></span>
		                <span>信用等级：<em><img title="<?php echo $borrow_fsafe[$borrow['fsafe']][0];?>" alt="<?php echo $borrow_fsafe[$borrow['fsafe']][0];?>" src="<?php echo $borrow_fsafe[$borrow['fsafe']][1];?>">  </em></span>
		                <br>
		                <span>理财金额<em> <?php echo $borrow['account'];?> 元</em></span>
		                <br/>
		                <span>年利率 <em><?php echo $borrow['apr'];?> %</em></span>
		               <span  style="margin-left:40px;"><em><?php if($borrow['award']=='1') echo "奖励:+{$borrow['funds']}%"; elseif($borrow['award']=='2') echo "奖励:+{$borrow['funds']}元";?></em></span> 
		                <br>
						<span>发标时间<em> <?php echo date('Y-m-d H:i',$borrow['auto_verify_time']);?></em></span>
		              </dt>
		            </dl></a>
		          </li>
		          <?php }?>
		        </ul>
		        <br/><br/>
		       </div>
     	</div>
    </div>
</section>

<script type="text/javascript">
var invbd_titleSwiper = new Swiper('.swiper-container',{
	speed:500,
	onSlideChangeStart: function(){
		$(".invbd_title .active").removeClass('active');
		$(".invbd_title li").eq(invbd_titleSwiper.activeIndex).addClass('active');
	}
});

$(".invbd_title li").on('touchstart mousedown',function(e){
	e.preventDefault()
	$(".invbd_title .active").removeClass('active');
	$(this).addClass('active');
	invbd_titleSwiper.swipeTo($(this).index());
});
$(".invbd_title li").click(function(e){
	e.preventDefault();
});
</script>
<?php include './application/views/zhs_mobile/footer.php';?>
